package org.dna;

import org.dna.metronomo.persistence.IActivityDAO;
import org.dna.metronomo.persistence.IIssueDAO;
import org.dna.metronomo.persistence.IModuleDAO;
import org.dna.metronomo.persistence.IUserDAO;

/**
 * Extension of the MetroApplication to give the possibility of configure the
 * context used in tests.
 *
 * @author andrea
 */
public class MetroApplicationTestFacility extends MetroApplication {

    IActivityDAO activityDAO;
    IUserDAO userDAO;
    IIssueDAO issueDAO;
    IModuleDAO moduleDAO;

    @Override
    public IActivityDAO getActivityDAO() {
        return activityDAO;
    }

    public void setActivityDAO(IActivityDAO dao) {
        activityDAO = dao;
    }
    
    @Override
    public IUserDAO getUserDAO() {
        return this.userDAO;
    }
    
    public void setUserDAO(IUserDAO userDAO) {
        this.userDAO = userDAO;
    }

    @Override
    public IIssueDAO getIssueDAO() {
        return this.issueDAO;
    }

    public void setIssueDAO(IIssueDAO issueDAO) {
        this.issueDAO = issueDAO;
    }
    
    @Override
    public IModuleDAO getModuleDAO() {
        return this.moduleDAO;
    }

    public void setModuleDAO(IModuleDAO moduleDAO) {
        this.moduleDAO = moduleDAO;
    }
}
